-- GENERATED SPELL FOR [Defias Taskmaster] --


function spell0_4417(pUnit, Event) --@Piercing Shot,n/a--
pUnit:FullCastSpellOnTarget(6685,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4417', 15000, 1)
end

function spell1_4417(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4417', 545, 1)
end

function Sorts_4417(pUnit, Event)
local choix_sorts_4417 = math.random(0, 1)
if choix_sorts_4417 == 0 then
pUnit:RegisterEvent('spell0_4417', 1, 1)
end
if choix_sorts_4417 == 1 then
pUnit:RegisterEvent('spell1_4417', 1, 1)
end
end

function mob4417_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4417', math.random(1500, 3000), 1)
end

function mob4417_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4417_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4417_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4417, 1, 'mob4417_Action')
RegisterUnitEvent(4417, 2, 'mob4417_Leave')
RegisterUnitEvent(4417, 3, 'mob4417_Kill')
RegisterUnitEvent(4417, 4, 'mob4417_Die')
